package com.ruikong.dazhi.controller.base;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

/**
 * @program: dailychemicalmes
 * @description:
 * @author: tybengine
 * @create: 2020-11-30 12:54
 **/
@Controller
@RequestMapping(value = "view")
public class ViewController {


//    @Autowired
//    private OrConfigOrderMapper orConfigOrderMapper;

    @RequestMapping(value = "/login")
    public String login() {
        return "base/login";
    }

    @RequestMapping(value = "/home")
    public String home() {
        return "base/home";
    }

    @RequestMapping(value = "/index")
    public String index() {
        return "base/index";
    }

    /**
     * 基础数据
     *
     * @return
     */
    //车间
    @RequestMapping(value = "/workshop")
    public String workshop() {
        return "basicinfo/workshop";
    }

    // 产线
    @RequestMapping(value = "/line")
    public String line() {
        return "basicinfo/line";
    }

    // 包材
    @RequestMapping(value = "/package")
    public String bcgl() {
        return "basicinfo/package";
    }

    //产品
    @RequestMapping(value = "/product")
    public String product() {
        return "basicinfo/product";
    }

    // 生产设备
    @RequestMapping(value = "/equip")
    public String equip() {
        return "basicinfo/equip";
    }

    // 原料
    @RequestMapping(value = "/material")
    public String material() {
        return "basicinfo/material";
    }
    //原料类型
    @RequestMapping(value = "/materialType")
    public String materialType() {
        return "basicinfo/materialType";
    }


    // 计量单位
    @RequestMapping(value = "/unit")
    public String unit() {
        return "basicinfo/unit";
    }

    // 供应商管理
    @RequestMapping(value = "/supplier")
    public String supplier() {
        return "basicinfo/supplier";
    }

    /**
     * 统计分析
     */
    // 效率分析
    @RequestMapping(value = "/analysis_efficiency")
    public String analysis_efficiency() {
        return "analysis/analysis_efficiency";
    }
    // 异常分析
    @RequestMapping(value = "/analysis_unusual")
    public String analysis_unusual() {
        return "analysis/analysis_unusual";
    }


    // 物料分析
    @RequestMapping(value = "/analysis_stock")
    public String analysis_stock() {
        return "analysis/analysis_stock";
    }

    /**
     * 系统管理
     */
    // 部门
    @RequestMapping(value = "/department")
    public String department() {
        return "system/department";
    }

    // 角色管理
    @RequestMapping(value = "/role")
    public String role() {
        return "system/role";
    }

    // 人员
    @RequestMapping(value = "/user")
    public String user() {
        return "system/user";
    }

    // 账号
    @RequestMapping(value = "/account")
    public String account() {
        return "system/account";
    }


    /**
     * 日志管理
     *
     * @return
     */
    //登录日志
    @RequestMapping(value = "login_log")
    public String login_log() {
        return "base/login_log";
    }

    @RequestMapping(value = "operate_log")
    public String operate_log() {
        return "base/operate_log";
    }

    /**
     * 工艺管理
     */
    // 工序
    @RequestMapping(value = "operate")
    public String operate() {
        return "process/operate";
    }

    // bom
    @RequestMapping(value = "bom")
    public String bom() {
        return "process/bom";
    }

    // 配方
    @RequestMapping(value = "recipe")
    public String recipe() {
        return "process/recipe";
    }

    @RequestMapping(value = "apply_detail")
    private ModelAndView apply_detail(@RequestParam(value = "applyOrderId") Integer applyOrderId) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("applyOrderId", applyOrderId);
        modelAndView.setViewName("process/apply_detail");
        return modelAndView;
    }

    @RequestMapping(value = "check_detail")
    private ModelAndView check_detail(@RequestParam(value = "checkOrderId") Integer checkOrderId) {
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("checkOrderId", checkOrderId);
        modelAndView.setViewName("process/check_detail");
        return modelAndView;
    }

    /**
     * 工单管理
     */
    // 销售订单
    @RequestMapping(value = "sales")
    public String sales() {
        return "order/sales";
    }


    // 配制工单
    @RequestMapping(value = "preparation")
    public String preparation() {
        return "order/preparation";
    }


    // 灌包工单
    @RequestMapping(value = "bagging")
    public String bagging() {
        return "order/bagging";
    }

    // 包材预处理单
    @RequestMapping(value = "pack_preprocessed")
    private String pack_preprocessed() {
        return "order/pack_preprocessed";
    }

    // 半成品检验
    @RequestMapping(value = "semi_checkout")
    private String semi_checkout() {
        return "order/semi_checkout";
    }

    // 成品检验
    @RequestMapping(value = "finish_checkout")
    private String finish_checkout() {
        return "order/finish_checkout";
    }
    /**
     *  生产管理
     */


    // 个人中心
    @RequestMapping(value = "user_info")
    private String user_info() {
        return "user/userinfo";
    }


    /**
     * 弹窗选择
     */
    // 选择供应商
    @RequestMapping(value = "select_supplier")
    private String select_supplier() {
        return "select/select_supplier";
    }

    //选择BOM物料
    @RequestMapping(value = "select_bom_stock")
    private String select_bom_stock() {
        return "select/select_bom_stock";
    }

    // 选择计量单位
    @RequestMapping(value = "select_unit")
    private String select_unit() {
        return "select/select_unit";
    }

    // 选择生产计划
    @RequestMapping(value = "select_plan")
    private String select_plan() {
        return "select/select_plan";
    }

    // 选择用户
    @RequestMapping(value = "select_user")
    private String select_user() {
        return "select/select_user";
    }



    // 选择原料
    @RequestMapping(value = "select_stock")
    private String select_stock() {
        return "select/select_stock";
    }



    // 看板
    @RequestMapping("/main_board")
    private String main_board() {
        return "board/main_board";
    }

    //生产批记录
    @RequestMapping("/batch_record")
    private String batchRecord() {
        return "order/batch_record";
    }

    //工艺管理
    @RequestMapping(value = "technology")
    public String technology() {
        return "order/technology";
    }

    // 工艺展示
    @RequestMapping(value = "configure_flow")
    public String configure_flow() {
        return "order/configure_flow";
    }

    //称配料工单
    @RequestMapping(value = "weight_order")
    public String weight_order() {
        return "order/weight_order";
    }

    //仓库管理
    //库位管理
    @RequestMapping(value = "warehouse")
    public String warehouse() {
        return "warehouse/warehouse";
    }
    //库存管理
    @RequestMapping(value = "warehouse_stock")
    public String warehouse_stock() {
        return "warehouse/warehouse_stock";}
    //盘库
    @RequestMapping(value = "warehouse_Inventory")
    public String warehouse_Inventory() {
        return "warehouse/warehouse_Inventory";
    }
    //出入库记录
    @RequestMapping(value = "warehouse_inout")
    public String warehouse_inout() {
        return "warehouse/warehouse_inout";
    }




    //设备看板
    @RequestMapping("/device_board")
    public String device_board() {
        return "board/device_board";
    }
    //称料看板
    @RequestMapping("/weight_board")
    public String weight_board() {
        return "board/weight_board";
    }
    //配制看板
    @RequestMapping("/config_board")
    public String config_board() {
        return "board/config_board";
    }



    @RequestMapping("/zutai1")
    private  String zutai1(){
        return  "zutai/zutai1";
    }

    @RequestMapping("/zutai2")
    private  String zutai2(){
        return  "zutai/zutai2";
    }


}
